/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.admanager.generalpattern.plugin.generalpattern.impl;

import org.admanager.generalpattern.plugin.generalpattern.*;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EFactoryImpl;

import org.eclipse.emf.ecore.plugin.EcorePlugin;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class generalpatternFactoryImpl extends EFactoryImpl implements generalpatternFactory {
	/**
	 * Creates the default factory implementation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static generalpatternFactory init() {
		try {
			generalpatternFactory thegeneralpatternFactory = (generalpatternFactory)EPackage.Registry.INSTANCE.getEFactory("http://generalpattern/1.0"); 
			if (thegeneralpatternFactory != null) {
				return thegeneralpatternFactory;
			}
		}
		catch (Exception exception) {
			EcorePlugin.INSTANCE.log(exception);
		}
		return new generalpatternFactoryImpl();
	}

	/**
	 * Creates an instance of the factory.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public generalpatternFactoryImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
			case generalpatternPackage.ELEMENT: return createElement();
			case generalpatternPackage.ROLE: return createRole();
			case generalpatternPackage.MULTIPLICITY: return createMultiplicity();
			case generalpatternPackage.CONSTRAINT: return createConstraint();
			case generalpatternPackage.COMPOSITE_ELEMENT: return createCompositeElement();
			case generalpatternPackage.SIMPLE_ELEMENT: return createSimpleElement();
			case generalpatternPackage.COMPONENT: return createComponent();
			case generalpatternPackage.CONNECTOR: return createConnector();
			case generalpatternPackage.COMPONENT_PORT: return createComponentPort();
			case generalpatternPackage.CONNECTOR_ROLE: return createConnectorRole();
			case generalpatternPackage.MERGING_OPERATOR: return createMergingOperator();
			case generalpatternPackage.OVERLAPPING: return createOverlapping();
			case generalpatternPackage.STRINGING: return createStringing();
			case generalpatternPackage.PATTERN: return createPattern();
			default:
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Element createElement() {
		ElementImpl element = new ElementImpl();
		return element;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Role createRole() {
		RoleImpl role = new RoleImpl();
		return role;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Multiplicity createMultiplicity() {
		MultiplicityImpl multiplicity = new MultiplicityImpl();
		return multiplicity;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Constraint createConstraint() {
		ConstraintImpl constraint = new ConstraintImpl();
		return constraint;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CompositeElement createCompositeElement() {
		CompositeElementImpl compositeElement = new CompositeElementImpl();
		return compositeElement;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public SimpleElement createSimpleElement() {
		SimpleElementImpl simpleElement = new SimpleElementImpl();
		return simpleElement;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Component createComponent() {
		ComponentImpl component = new ComponentImpl();
		return component;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Connector createConnector() {
		ConnectorImpl connector = new ConnectorImpl();
		return connector;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ComponentPort createComponentPort() {
		ComponentPortImpl componentPort = new ComponentPortImpl();
		return componentPort;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ConnectorRole createConnectorRole() {
		ConnectorRoleImpl connectorRole = new ConnectorRoleImpl();
		return connectorRole;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MergingOperator createMergingOperator() {
		MergingOperatorImpl mergingOperator = new MergingOperatorImpl();
		return mergingOperator;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Overlapping createOverlapping() {
		OverlappingImpl overlapping = new OverlappingImpl();
		return overlapping;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Stringing createStringing() {
		StringingImpl stringing = new StringingImpl();
		return stringing;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Pattern createPattern() {
		PatternImpl pattern = new PatternImpl();
		return pattern;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public generalpatternPackage getgeneralpatternPackage() {
		return (generalpatternPackage)getEPackage();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @deprecated
	 * @generated
	 */
	public static generalpatternPackage getPackage() {
		return generalpatternPackage.eINSTANCE;
	}

} //generalpatternFactoryImpl
